package com.example.sourcesprng.instantiation;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

@Service
public class InitBeforeService {

    @Value("${name}")
    private String name;

    public InitBeforeService() {
    }

    public InitBeforeService(String name) {
        this.name = name;
    }

    public void say() {
        System.out.println("name:" + name);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
